package com.java.main.domain.token;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.java.main.domain.SysEntity.SysEntityAuto;

/**
 * 
 * 
 * @Description:token表
 * 
 * @author:WangYueQiang
 * 
 * @time:2017年3月16日 上午11:56:13
 */

@Entity
@Table(name = "token")
public class TokenDO extends SysEntityAuto implements Serializable {
	private static final long serialVersionUID = 1L;

	/** 用户id */
	@Column(nullable = false, length = 20)
	private Integer userId;

	/** ip地址 */
	@Column(nullable = false, length = 200)
	private String ip = "127.0.0.1";

	/** token */
	@Column(nullable = false, length = 250)
	private String token;

	/** 有效期 */
	@Column(nullable = false)
	private Date expiryTime;

	/** 用户类型 0为普通网页登录用户) */
	@Column(nullable = false, length = 11)
	private Integer type;

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public Date getExpiryTime() {
		return expiryTime;
	}

	public void setExpiryTime(Date expiryTime) {
		this.expiryTime = expiryTime;
	}

}
